<?php

namespace Database\Seeders;

use App\Models\SystemAttachment;
use Illuminate\Database\Seeder;

class AttachmentSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $attachment = [
            [
                'user_id' => 1,
                'name' => 'a1.png',
                'category_id' => '55',
                'hash' => 'aaa',
                'att_dir' => 'https://wm-shop-api.oss-cn-beijing.aliyuncs.com/byteshop/a1.png',
                'size' => '999',
                'type' => 'image/png',
                'upload_type' => 'oss',
                'module_type' => 'admin',
                'original_name' => 'a1.png'
            ],
            [
                'user_id' => 2,
                'name' => 'a2.png',
                'category_id' => '56',
                'hash' => 'bbb',
                'att_dir' => 'https://wm-shop-api.oss-cn-beijing.aliyuncs.com/byteshop/a2.png',
                'size' => '999',
                'type' => 'image/png',
                'upload_type' => 'oss',
                'module_type' => 'admin',
                'original_name' => 'a2.png'
            ],
            [
                'user_id' => 1,
                'name' => 'a3.png',
                'category_id' => '57',
                'hash' => 'ccc',
                'att_dir' => 'https://wm-shop-api.oss-cn-beijing.aliyuncs.com/byteshop/a3.png',
                'size' => '999',
                'type' => 'image/png',
                'upload_type' => 'oss',
                'module_type' => 'admin',
                'original_name' => 'a3.png'
            ],
            [
                'user_id' => 1,
                'name' => 'a4.png',
                'category_id' => '58',
                'hash' => 'ddd',
                'att_dir' => 'https://wm-shop-api.oss-cn-beijing.aliyuncs.com/byteshop/a4.png',
                'size' => '999',
                'type' => 'image/png',
                'upload_type' => 'oss',
                'module_type' => 'admin',
                'original_name' => 'a4.png'
            ],
            [
                'user_id' => 1,
                'name' => 'a5.png',
                'category_id' => '59',
                'hash' => 'eee',
                'att_dir' => 'https://wm-shop-api.oss-cn-beijing.aliyuncs.com/byteshop/a5.png',
                'size' => '999',
                'type' => 'image/png',
                'upload_type' => 'oss',
                'module_type' => 'admin',
                'original_name' => 'a5.png'
            ],
        ];

        foreach ($attachment as $value){
            SystemAttachment::create($value);
        }

        SystemAttachment::factory()->count(10)->create();
    }
}
